package com.dragon.modules.yuegou.model.wallet;

import com.dragon.modules.yuegou.entity.wallet.MerchantTradeEntity;
import com.dragon.modules.yuegou.enums.CurrencyType;
import com.dragon.modules.yuegou.enums.wallet.MerchantTradeOrderType;
import com.dragon.modules.yuegou.enums.wallet.MerchantTradeProcessState;
import com.dragon.modules.yuegou.enums.wallet.MerchantTradeType;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商户交易（在商户角度的交易流水）模型类
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:36
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MerchantTrade extends MerchantTradeEntity {

	@ApiModelProperty("商户名称")
	private String merchantName;

	@ApiModelProperty("微信支付宝收入金额")
	private BigDecimal incomeAmount;

	@ApiModelProperty("支出金额")
	private BigDecimal paiedAmount;

	@ApiModelProperty("提现金额")
	private BigDecimal withdrawAmount;

	@ApiModelProperty("运费金额")
	private BigDecimal freightAmount;

	@ApiModelProperty("悦币悦卡收入金额")
	private BigDecimal yueAmount;

	private String busdId;

	@ApiModelProperty("开始时间")
	private LocalDateTime createTimeBetweenS;

	@ApiModelProperty("结束时间")
	private LocalDateTime createTimeBetweenE;

	@ApiModelProperty("交易类型：0-收入、1-支出")
	private Integer tradeType;

	@ApiModelProperty("交易类型")
	private String tradeTypeName;

	@ApiModelProperty("交易订单类型")
	private String orderTypeName;

	@ApiModelProperty("支付方式")
	private String payTypeName;

	@ApiModelProperty("实际到账")
	private BigDecimal actualAmount;

	@ApiModelProperty("处理状态")
	private String processStateName;

	public Integer getTradeType() {
		return tradeType;
	}

	public void setTradeType(Integer tradeType) {
		this.tradeType = tradeType;
	}

	public String getTradeTypeName() {
		return tradeTypeName;
	}

	public void setTradeTypeName(String tradeTypeName) {
		this.tradeTypeName = tradeTypeName;
	}

	public String getOrderTypeName() {
		return orderTypeName;
	}

	public void setOrderTypeName(String orderTypeName) {
		this.orderTypeName = orderTypeName;
	}

	public String getPayTypeName() {
		return payTypeName;
	}

	public void setPayTypeName(String payTypeName) {
		this.payTypeName = payTypeName;
	}

	public BigDecimal getActualAmount() {
		return actualAmount;
	}

	public void setActualAmount(BigDecimal actualAmount) {
		this.actualAmount = actualAmount;
	}

	public String getProcessStateName() {
		return processStateName;
	}

	public void setProcessStateName(String processStateName) {
		this.processStateName = processStateName;
	}

	public String getBusdId() {
		return busdId;
	}

	public void setBusdId(String busdId) {
		this.busdId = busdId;
	}

	public LocalDateTime getCreateTimeBetweenS() {
		return createTimeBetweenS;
	}

	public void setCreateTimeBetweenS(LocalDateTime createTimeBetweenS) {
		this.createTimeBetweenS = createTimeBetweenS;
	}

	public LocalDateTime getCreateTimeBetweenE() {
		return createTimeBetweenE;
	}

	public void setCreateTimeBetweenE(LocalDateTime createTimeBetweenE) {
		this.createTimeBetweenE = createTimeBetweenE;
	}

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	public BigDecimal getIncomeAmount() {
		return incomeAmount;
	}

	public void setIncomeAmount(BigDecimal incomeAmount) {
		this.incomeAmount = incomeAmount;
	}

	public BigDecimal getPaiedAmount() {
		return paiedAmount;
	}

	public void setPaiedAmount(BigDecimal paiedAmount) {
		this.paiedAmount = paiedAmount;
	}

	public BigDecimal getWithdrawAmount() {
		return withdrawAmount;
	}

	public void setWithdrawAmount(BigDecimal withdrawAmount) {
		this.withdrawAmount = withdrawAmount;
	}

	public BigDecimal getFreightAmount() {
		return freightAmount;
	}

	public void setFreightAmount(BigDecimal freightAmount) {
		this.freightAmount = freightAmount;
	}

	public BigDecimal getYueAmount() {
		return yueAmount;
	}

	public void setYueAmount(BigDecimal yueAmount) {
		this.yueAmount = yueAmount;
	}

	/**
	 * 构造一个空商户交易（在商户角度的交易流水）模型对象
	 */
	public MerchantTrade(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个商户交易（在商户角度的交易流水）模型对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantTrade(MerchantTradeEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个商户交易（在商户角度的交易流水）模型对象
	 * 
	 * @param other 其它对象
	 */
	public MerchantTrade(MerchantTrade other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置交易ID（与分表中的ID保持一致）
	 * 
	 * @param id 交易ID（与分表中的ID保持一致）
	 * @return 当前对象
	 */
    public MerchantTrade id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
    public MerchantTrade merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public String getMerchantWalletId() {
    	return merchantWalletId;
    }

    /**
	 * 设置商户钱包ID
	 * 
	 * @param merchantWalletId 商户钱包ID
	 * @return 当前对象
	 */
    public MerchantTrade merchantWalletId(String merchantWalletId) {
    	this.merchantWalletId = merchantWalletId;
    	return this;
    }

	@Override
	public BigDecimal getAmount() {
    	return amount;
    }

    /**
	 * 设置收入金额（正数表示收入，负数表示支出）
	 * 
	 * @param amount 收入金额（正数表示收入，负数表示支出）
	 * @return 当前对象
	 */
    public MerchantTrade amount(BigDecimal amount) {
    	this.amount = amount;
    	return this;
    }

	@Override
	public BigDecimal getAmountBefore() {
    	return amountBefore;
    }

    /**
	 * 设置交易前余额
	 * 
	 * @param amountBefore 交易前余额
	 * @return 当前对象
	 */
    public MerchantTrade amountBefore(BigDecimal amountBefore) {
    	this.amountBefore = amountBefore;
    	return this;
    }

	@Override
	public BigDecimal getAmountAfter() {
    	return amountAfter;
    }

    /**
	 * 设置交易后余额
	 * 
	 * @param amountAfter 交易后余额
	 * @return 当前对象
	 */
    public MerchantTrade amountAfter(BigDecimal amountAfter) {
    	this.amountAfter = amountAfter;
    	return this;
    }

	@Override
	public CurrencyType getCurrencyType() {
    	return currencyType;
    }

    /**
	 * 设置[全局枚举]币种：0-悦币-YUE_COIN、1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT、3-微信-WECHAT、4-支付宝-ALIPAY
	 * 
	 * @param currencyType [全局枚举]币种：0-悦币-YUE_COIN、1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT、3-微信-WECHAT、4-支付宝-ALIPAY
	 * @return 当前对象
	 */
    public MerchantTrade currencyType(CurrencyType currencyType) {
    	this.currencyType = currencyType;
    	return this;
    }

	@Override
	public MerchantTradeType getType() {
    	return type;
    }

    /**
	 * 设置[枚举]类型：0-扫码-SCAN_PAY、1-提货-PICK_UP、2-退款-REFUND、3-提现-WITHDRAW、4-购买-BUY、5-手续费-POUNDAGE、6-运费-FREIGHT、7-悦卡结算-YUECARD
	 * 
	 * @param type [枚举]类型：0-扫码-SCAN_PAY、1-提货-PICK_UP、2-退款-REFUND、3-提现-WITHDRAW、4-购买-BUY、5-手续费-POUNDAGE、6-运费-FREIGHT、7-悦卡结算-YUECARD
	 * @return 当前对象
	 */
    public MerchantTrade type(MerchantTradeType type) {
    	this.type = type;
    	return this;
    }

	@Override
	public String getOrderNo() {
    	return orderNo;
    }

    /**
	 * 设置订单号
	 * 
	 * @param orderNo 订单号
	 * @return 当前对象
	 */
    public MerchantTrade orderNo(String orderNo) {
    	this.orderNo = orderNo;
    	return this;
    }

	@Override
	public String getRemarks() {
    	return remarks;
    }

    /**
	 * 设置交易备注
	 * 
	 * @param remarks 交易备注
	 * @return 当前对象
	 */
    public MerchantTrade remarks(String remarks) {
    	this.remarks = remarks;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置交易时间
	 * 
	 * @param createdTime 交易时间
	 * @return 当前对象
	 */
    public MerchantTrade createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }
    
    @Override
	public String getCardTemplateId() {
    	return cardTemplateId;
    }

    /**
	 * 设置悦卡模板ID（商户收入悦卡时存在）
	 * 
	 * @param cardTemplateId 悦卡模板ID（商户收入悦卡时存在）
	 * @return 当前对象
	 */
    public MerchantTrade cardTemplateId(String cardTemplateId) {
    	this.cardTemplateId = cardTemplateId;
    	return this;
    }

	@Override
	public String getGoodsId() {
    	return goodsId;
    }

    /**
	 * 设置单品id 核销时存入
	 * 
	 * @param goodsId 单品id 核销时存入
	 * @return 当前对象
	 */
    public MerchantTrade goodsId(String goodsId) {
    	this.goodsId = goodsId;
    	return this;
    }

	@Override
	public BigDecimal getAmountPoundage() {
    	return amountPoundage;
    }

    /**
	 * 设置手续费
	 * 
	 * @param amountPoundage 手续费
	 * @return 当前对象
	 */
    public MerchantTrade amountPoundage(BigDecimal amountPoundage) {
    	this.amountPoundage = amountPoundage;
    	return this;
    }

	@Override
	public MerchantTradeProcessState getProcessState() {
    	return processState;
    }

    /**
	 * 设置[枚举]处理状态：0-未处理-UNPROCESS、1-已处理-PROCESSED
	 * 
	 * @param processState [枚举]处理状态：0-未处理-UNPROCESS、1-已处理-PROCESSED
	 * @return 当前对象
	 */
    public MerchantTrade processState(MerchantTradeProcessState processState) {
    	this.processState = processState;
    	return this;
    }

	@Override
	public MerchantTradeOrderType getOrderType() {
    	return orderType;
    }

    /**
	 * 设置[枚举]类型：0-购物订单-BUY、1-扫码支付-SCAN_PAY、2-停车支付-PARK、3-商户停车券-MERCHANT_COUPON_BUY、4-购买悦卡-CARD_BUY、5-充值悦币-RECHARGE_COIN、6-仪表充值-DOORNO_RECHARGE、7-商户仪表充值-MERCHANT_DOORNO_RECHARGE、8-商户会员等级充值-MERCHANT_LEVEL_BUY、9-疯狂砍价-BARGAIN、10-秒杀-SECKILL、11-限时折扣-LIMIT_SALES、12-积分兑换-POINTS、13-购买套餐-MEAL、14-全民拼团-GROUPON、15-抽奖-LOTTERY、16-物业缴费-PROPERTY_PAY_COST、17-商户物业缴费-MERCHANT_PROPERTY_PAY_COST、18-配送到家-DELIVERY_TO_HOME
	 * 
	 * @param orderType [枚举]类型：0-购物订单-BUY、1-扫码支付-SCAN_PAY、2-停车支付-PARK、3-商户停车券-MERCHANT_COUPON_BUY、4-购买悦卡-CARD_BUY、5-充值悦币-RECHARGE_COIN、6-仪表充值-DOORNO_RECHARGE、7-商户仪表充值-MERCHANT_DOORNO_RECHARGE、8-商户会员等级充值-MERCHANT_LEVEL_BUY、9-疯狂砍价-BARGAIN、10-秒杀-SECKILL、11-限时折扣-LIMIT_SALES、12-积分兑换-POINTS、13-购买套餐-MEAL、14-全民拼团-GROUPON、15-抽奖-LOTTERY、16-物业缴费-PROPERTY_PAY_COST、17-商户物业缴费-MERCHANT_PROPERTY_PAY_COST、18-配送到家-DELIVERY_TO_HOME
	 * @return 当前对象
	 */
    public MerchantTrade orderType(MerchantTradeOrderType orderType) {
    	this.orderType = orderType;
    	return this;
    }

	@Override
	public BigDecimal getRealAmount() {
    	return realAmount;
    }

    /**
	 * 设置实际交易金额
	 * 
	 * @param realAmount 实际交易金额
	 * @return 当前对象
	 */
    public MerchantTrade realAmount(BigDecimal realAmount) {
    	this.realAmount = realAmount;
    	return this;
    }
}
